package com.runtime.hongyunuser.service;

import com.runtime.hongyunuser.bean.Productimages;
import com.runtime.hongyunuser.bean.Products;
import com.runtime.hongyunuser.bean.Userfavorites;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
public interface ProductService {
    //模糊查询
    List<Products> selectProduct(String keyword);
    //精确查询
    List<Userfavorites> selectProductFavorite(long uesrId);
    //移出收藏夹
    int deleteProductFavorite(long uesrId, long productId);
    //添加收藏夹
    int addProductFavorite(long uesrId, long productId);

    //获取最新产品 创建时间前十个
    List<Products> getNewProducts();

    //获取推荐产品 随机七个
    List<Products> getFeaturedProducts();

    //获取价值产品 价值最低的十个
    List<Products> getValueProducts();

    //获取设备产品 随机七个
    List<Products> getDeviceProducts();

    //获取促销产品 促销产品随机七个
    List<Products> getPromotionProducts();

    Productimages getProductImages(Integer productId);

    Products getProductById(long productId);


}
